//
//  HNSH_OrderDetailHeader.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2023/3/3.
//

#import "HNSH_OrderDetailHeader.h"

@interface HNSH_OrderDetailHeader ()

/* bgView */
@property (nonatomic, strong) UIView *bgView;

/* shopNameLabel */
@property (nonatomic, strong) UILabel *shopNameLabel;

@end

@implementation HNSH_OrderDetailHeader

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor appBGColor];
        [self configUI];
    }
    return self;
}

- (void)setShopNameString:(NSString *)shopNameString {
    _shopNameString = shopNameString;
    self.shopNameLabel.text = shopNameString;
}

- (void)configUI {
    [self.contentView addSubview:self.bgView];
    [self.bgView addSubview:self.shopNameLabel];
}


#pragma mark lazy
- (UIView *)bgView {
    if (!_bgView) {
        _bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 8, kScreenWidth, 44)];
        _bgView.backgroundColor = [UIColor appWhiteLabelColor];
    }
    return _bgView;
}

- (UILabel *)shopNameLabel {
    if (!_shopNameLabel) {
        _shopNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 13, 150, 20)];
        _shopNameLabel.text = @"";
        _shopNameLabel.textColor = [UIColor appBlackLabelColor];
        _shopNameLabel.font = [UIFont systemFontOfSize:14];
    }
    return _shopNameLabel;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
